<h1>Editing category</h1>

<% form_for(@category) do |f| %>
  <%= f.error_messages %>

  <p>
		<%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  <p>
		<%= f.label :upcategory %><br />
    <%= select("category", "upcategory_id", Upcategory.find(:all).collect{ |c| [ c.name, c.id] }) %>
  </p>
	
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', @category %> |
<%= link_to 'Back', categories_path %>